package com.jz.main.io.classloader;

public class MyClassLoader extends ClassLoader {
//    @Override
//    protected Class<?> findClass(String name) throws ClassNotFoundException {
//        return super.findClass(name);
//    }

//    volatile

    protected Class findClass(String name) {
        byte[] b = loadClassData(name);
        return defineClass(name, b, 0, b.length);
    }

    private byte[] loadClassData(String name) {
        // load the class data from the connection
        // 加载class文件
        return new byte[0];
    }

    public static void main(String[] args) {
        Class clazz = MyClassLoader.class.getClass();
        System.out.println(MyClassLoader.class.getClassLoader());
        System.out.println(clazz);
        int i = 1_0000;
        System.out.println(i);

    }
}

